/*Class DisasterNode
 * 
 * 
 * 
 */
package disasterGameProj;

import java.util.Random;

public class DisasterNode
{
	//initial variables
	public int startXLoc;
	public int startYLoc;
	public int priority;
	public int disasterRate;
	public String disasterType;
	
	
	//constructor
	DisasterNode( int startX, int startY, int myPriority, String type)
	{
		startXLoc = startX;
		startYLoc = startY;
		priority = myPriority;
		disasterType = type;
		disasterRate = createDisasterRate();
	}


	private int createDisasterRate()
	{
		Random generator = new Random();
		int disasterRate = 0;
		
		if( disasterType.equals( "fire" ) )
			disasterRate = generator.nextInt( 10 - 1 ) + 1;
		else if ( disasterType.equals( "crumble" ) )
			disasterRate = generator.nextInt( 5 - 1 ) + 1;
		
		return disasterRate;
	}
	
	
	
}
